﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        // HTTP get 方法
        LbQueryString.Text = "limit=" + Request.QueryString["limit"] + ", page=" + Request.QueryString["page"];
        // HTTP post 方法
        LbForm.Text = Request.Form["TbUsername"];

        LbForm2.Text = Request.Form["username"] + Request.Form["submit"];
        // Server Variables
        foreach (var item in Request.ServerVariables)
        {
            LbServerVariables.Text += "Key:" + item + "<br>";
        }
        LbServerVariables.Text += "服务器地址: " + Request.ServerVariables["LOCAL_ADDR"] + "<br>";
        LbServerVariables.Text += "服务器端口: " + Request.ServerVariables["SERVER_PORT"] + "<br>";
        LbServerVariables.Text += "访问客户端地址 :" + Request.ServerVariables["REMOTE_ADDR"] + "<br>";
        // Browser
        LbBrowser.Text = "浏览器类型: " + Request.Browser["Browser"] + ",浏览器的版本号: " + 
            Request.Browser.Version;
        Response.Write(Request.RawUrl + "<br>");
        Response.Write(Request.Cookies.Keys.Count + "<br><br>");
    }
}